<!DOCTYPE html>
<!--
该页面是将最右边的重复性代码分离出来
方便管理
-->
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:fragment="head(title,links,styles)">
</head>
<body>

<div th:fragment="div_js">
    <!-- jQuery 3 -->
    <script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.min.js"></script>
    <!-- Bootstrap 3.3.7 -->
    <script src="https://cdn.bootcss.com/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
    <!-- AdminLTE App -->
    <script src="https://cdn.bootcss.com/admin-lte/2.4.5/js/adminlte.min.js"></script>
    <!-- SlimScroll 好看的滚动条-->
    <script src="https://cdn.bootcss.com/jQuery-slimScroll/1.3.8/jquery.slimscroll.min.js"></script>
    <!-- FastClick 绕过浏览器的 300ms 点击延时-->
    <script src="https://cdn.bootcss.com/fastclick/1.0.6/fastclick.js"></script>
    <!-- iCheck 1.0.1 -->
    <script src="https://cdn.bootcss.com/iCheck/1.0.2/icheck.min.js"></script>
    <!-- Select2 -->
    <script src="https://cdn.bootcss.com/select2/4.0.7/js/select2.min.js"></script>
    <!-- sql 注入过滤 -->
    <script language="javascript">
        var re = /select|update|delete|truncate|join|union|exec|insert|drop|count|'|"|;|>|<|%/i;
        $(function() {
            $('.sql-injection-filter').keyup(function () {
                this.value = this.value.replace(re, '');
            })
        })
    </script>
</div>

<!-- 將使用到dataTable的部分提取出來-->
<div th:fragment="data_table_js">
    <!-- DataTables -->
    <script src="/static/AdminLTE/bower_components/datatables.net/js/jquery.dataTables.min.js"></script>
    <script src="/static/AdminLTE/bower_components/datatables.net-bs/js/dataTables.bootstrap.min.js"></script>
    <script>
        $(function() {
            $('table.data-table').DataTable({
                scrollX: true,
                lengthMenu: [10, 20, 35, 50],
                language: {
                    "sProcessing": "处理中...",
                    "sLengthMenu": "显示 _MENU_ 项结果",
                    "sZeroRecords": "没有匹配结果",
                    "sInfo": "显示第 _START_ 至 _END_ 项结果，共 _TOTAL_ 项",
                    "sInfoEmpty": "显示第 0 至 0 项结果，共 0 项",
                    "sInfoFiltered": "(由 _MAX_ 项结果过滤)",
                    "sInfoPostFix": "",
                    "sSearch": "过滤:",
                    "sUrl": "",
                    "sEmptyTable": "表中数据为空",
                    "sLoadingRecords": "载入中...",
                    "sInfoThousands": ",",
                    "oPaginate": {
                        "sFirst": "首页",
                        "sPrevious": "上页",
                        "sNext": "下页",
                        "sLast": "尾页"
                    },
                    "decimal": ",",
                    "thousands": ".",
                    "oAria": {
                        "sSortAscending": ": 以升序排列此列",
                        "sSortDescending": ": 以降序排列此列"
                    }
                }
            })
        })
    </script>
</div>
</body>
</html>